package cn.ktp.demo;

import java.io.IOException;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;

import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo;
import com.alibaba.nacos.spring.context.annotation.config.EnableNacosConfig;
import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource;

@EnableDubbo(scanBasePackages = "cn.ktp.demo.service")
@SpringBootApplication
@EnableHystrix
@MapperScan(basePackages = "cn.ktp.demo.dao")
@EnableNacosConfig
@NacosPropertySource(dataId = "demo-service", autoRefreshed = true)
public class KtpDemoProvider {
	public static void main(String[] args) throws IOException {
		new SpringApplicationBuilder().web(WebApplicationType.NONE).sources(KtpDemoProvider.class).run(args);
		System.out.println("DemoService provider is starting...");
		System.in.read();
	}
}
